function load(){
    var streetList = [
        {name:"外滩",value:'wt'},
        {name:"南京路",value:'njdl'},
        // {name:"豫园（内圈）",value:'yy_n'},
        {name:"豫园（外圈）",value:'yy_w'},
        {name:"田子坊",value:'tzf'},
        {name:"新天地",value:'xtd'}];
    var html="";
    for(var i =0;i<streetList.length;i++){
        html += '<div class="streetmanager ' + ((i==0) ? 'active' : '') + '" id="'+streetList[i].value+'">';
        html += '<span>'+streetList[i].name+'</span>';
        html += '</div>';
    }
    $('.visitor-content').find('.visitor-street').append(html);


    Global.currentSpotArea = streetList[0].name;
    Global.currenntTimeSplit = getCurrentDateTime(undefined,['-','-','']);
    $('#vi-day-back-input').val(Global.currenntTimeSplit);

    $('.visitor-street').find('.streetmanager').off('click').on('click',function(){
        if($(this).hasClass('active')){
            return
        }else{
            $(this).addClass('active');
            $(this).siblings().removeClass('active');
            Global.currentSpotArea = $(this).find('span').text();

            var selectTime = $('#vi-day-back-input').val();
            //$('#vi-day-back-input').val(Global.currenntTimeSplit);
            getHistorySpotDataCountByButton(selectTime,Global.currentSpotArea,selectTime)
        }
    })

    $('.vi-day-d-seach').off('click').on('click',function(){
        var selectTime = $('#vi-day-back-input').val();
        Global.timeT = selectTime
        getHistorySpotDataCountByButton(selectTime,Global.currentSpotArea,selectTime)
    })



    $('.up-page-btn').off('click').on('click',function(){
        Global.pageStart = Global.pageStart - 10;
        Global.pageEnd = Global.pageEnd - 10;
        // console.log('1',Global.pageStart)
        // console.log('1',Global.pageEnd)
        if((Global.pageStart + 10) <= 0){
            Global.pageStart = 0;
            Global.pageEnd = 10;
            console.log($('.page-total-before'))
            $('.page-total-before').text((Global.pageEnd / 10) + '');
            return;
        }
        $('.page-total-before').text((Global.pageEnd / 10) + '');
        setTableData(Global.realTime.slice(Global.pageStart,Global.pageEnd),Global.maxTime,Global.total);
    })

    $('.down-page-btn').off('click').on('click',function(){
        Global.pageStart = Global.pageStart + 10;
        Global.pageEnd = Global.pageEnd + 10;
        // console.log('2',Global.pageStart)
        // console.log('2',Global.pageEnd)
        if((Global.pageEnd - 10) >= Global.realTime.length){
            Global.pageStart = parseInt(Global.realTime.length / 10) * 10;
            Global.pageEnd = Global.pageStart + 10;
            $('.page-total-before').text((Global.pageEnd / 10) + '');
            return;
        }
        $('.page-total-before').text((Global.pageEnd / 10) + '');
        setTableData(Global.realTime.slice(Global.pageStart,Global.pageEnd),Global.maxTime,Global.total);
    })

    getHistorySpotDataCountByButton(undefined,streetList[0].name,Global.currenntTimeSplit);

}

